package com.desaysv.wandroid.fragment.main.mvp

import com.desaysv.svhttp.callback.IRequestCallBack
import com.desaysv.wandroid.entity.AirticEntity
import com.desaysv.wandroid.entity.BannerEntity
import com.desaysv.wandroid.entity.BaseRes
import com.desaysv.wandroid.http.HttpManager

/**
 * @author linzi
 * @date 2022-11-16
 */
class MainModel :MainContract.IMainModel {
    override fun getBanner(requestCallBack: IRequestCallBack<BaseRes<List<BannerEntity>?>>) {
        HttpManager.getService().getBanner(requestCallBack)
    }

    override fun getData(page: Int, requestCallBack: IRequestCallBack<BaseRes<AirticEntity>>) {
        HttpManager.getService().getArticleList(page,requestCallBack)
    }

    override fun getTopAirtics(requestCallBack: IRequestCallBack<BaseRes<List<AirticEntity.DatasBean>>>) {
        HttpManager.getService().getTopAirtics(requestCallBack)
    }
}